﻿Imports System.IO
Public Class TESTFORM
    Inherits System.Web.UI.Page

    Public dbmanager As DBManager = New DBManager
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnUpload.Click
        If (fileuploadImage.HasFile) Then
            Dim imgLength As Integer = fileuploadImage.PostedFile.ContentLength
            Dim img As HttpPostedFile = fileuploadImage.PostedFile
            Dim imgName As String = Path.GetFileName(fileuploadImage.PostedFile.FileName)

            dbmanager.addImage(imgName, img, imgLength)
        End If
    End Sub

  
End Class